/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.entity.shop_car;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.shop.entity.goods.Goods;
import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 购物车Entity
 * @author sl
 * @version 2019-05-15
 */
public class ShopCar extends DataEntity<ShopCar> {
	
	private static final long serialVersionUID = 1L;
	private Goods goods;		// 商品id
	private String num;		// 数量
	private User user;		// 用户id
	
	public ShopCar() {
		super();
	}

	public ShopCar(String id){
		super(id);
	}


	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	
	@Length(min=0, max=64, message="数量长度必须介于 0 和 64 之间")
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}